﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace TPCN.DAL
{
    public class DonvitinhObj
    {
        #region [Private fields]
        private string _DonvitinhID;
        private string _Tendonvitinh;
        #endregion

        #region [Public Properties]
        public string DonvitinhID
        {
            get { return _DonvitinhID; }
            set { _DonvitinhID = value; }
        }

        public string Tendonvitinh
        {
            get { return _Tendonvitinh; }
            set { _Tendonvitinh = value; }
        }
        #endregion

        #region [Public methods]
        public DonvitinhObj SetValuesFromDataReader(IDataReader reader)
        {
            DonvitinhObj obj = new DonvitinhObj();
            obj.DonvitinhID = (reader["DonvitinhID"] is DBNull) ? String.Empty : reader["DonvitinhID"].ToString();
            obj.Tendonvitinh = (reader["Tendonvitinh"] is DBNull) ? String.Empty : reader["Tendonvitinh"].ToString();
            return obj;
        }

        #endregion
    }
}
